﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using EAS.Data.Access;
using EAS.Data.ORM;
using System.Runtime.Serialization;

namespace DataStudio
{
    public partial class GroupModule : DataEntity<GroupModule>
    {
        public IList<GroupModule> GetAll()
        {
            EAS.Data.Linq.DataEntityQuery<GroupModule> query =
                EAS.Data.Linq.DataEntityQuery<GroupModule>.Create();

            var p = from items in query
                    select items;
            return p.ToList();
        }

        public IList<GroupModule> GetListByGroupID(int ID)
        {
            EAS.Data.Linq.DataEntityQuery<GroupModule> query =
                EAS.Data.Linq.DataEntityQuery<GroupModule>.Create();

            var p = from item in query
                    where item.GroupID == ID
                    select item;
            return p.ToList();
        }
    }
}